<template>
    <div id="app">
        <router-view></router-view>
    </div>
</template>

<script>
    import store from './store'
    import { mapActions } from 'vuex'

    export default {
        name: 'app',
        store,
        methods: {
            ...mapActions('user', {
                parserUserAction: 'parserUser'
            })
        },
        beforeUpdate () {
            this.action(this.parserUserAction())
        }
    }
</script>

<style lang="scss">
    body {
        margin: 0;
        padding: 0;
    }

    #app {
        font-family: 'Avenir', Helvetica, Arial, sans-serif;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-align: center;
        color: #2c3e50;
    }

    .icon {
        width: 1em;
        height: 1em;
        vertical-align: -0.15em;
        fill: currentColor;
        overflow: hidden;
    }
</style>
